package utils;

public class MathUtils {

	public static int getMaxID(double[] vector){
		double m = Double.MIN_VALUE;
		int idx = -1;
		for(int i=0;i<vector.length;i++){
			if(vector[i]>m) {
				m = vector[i]; idx = i;
			}
		}
		return idx;
	}
	
	public static int getMaxID(int[] vector){
		int m = Integer.MIN_VALUE;
		int idx = -1;
		for(int i=0;i<vector.length;i++){
			if(vector[i]>m) {
				m = vector[i]; idx = i;
			}
		}
		return idx;
	}
}
